# -*- coding: UTF-8 -*-
"""
@author: tgy
@file: property_demo.py
@time: 2021/02/04
"""
from threading import Lock

lock = Lock()
try:
    lock.acquire()

finally:
    lock.release()

class Person:

    count = 0

    def __init__(self,name):
        self._name = name

    @property
    def name(self):
        return self._name

    @name.setter
    def name(self, name):
        self._name = name


class Stud(Person):
    ...
    def __init__(self,name,score):
        self.score = score
        super().__init__(name)

    def __getattribute__(self, item):
        return object.__getattribute__(self,item)



if __name__ == '__main__':
    pass
    stu = Stud('tony',21)
    stu.name = 'mikey'
    print(stu.name)

